package com.lh.project.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lh.project.model.entity.User;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

/**
* @Entity com.lh.project.model.entity.User
*/
public interface UserMapper extends BaseMapper<User> {


    @Select("select * from user where openId = '${openId}'")
    @Results({
            @Result(column = "id",property = "id"),
            @Result(column = "stu_number",property ="stuNumber"),
            @Result(column = "wallet",property = "wallet"),
            @Result(column = "openId",property = "openid"),
            @Result(column = "password",property = "password"),
            @Result(column = "nick_name",property = "nickName"),
            @Result(column = "icon",property = "icon"),
            @Result(column = "create_time",property = "createTime"),
            @Result(column = "update_time",property = "updateTime"),
    })
    User getByOpenid(String openId);
}
